﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:forEach var="menu" items="${submenus}">
	            <c:if test="${menu.key == activeMenu}">
	            	<c:set var="isDisplay" value="true"/>
	            </c:if>
 </c:forEach>
<c:if test="${not empty isDisplay && isDisplay}">
	<aside class="aside-nav">
	    <nav class="menu">
	        <!-- <li class="menu-item z-active"><i class="pull-left icon icon-person"></i><a href="">租客</a></li>
	        <li class="menu-item"><i class="pull-left icon icon-house"></i><a href="">房源</a></li>
	        <li class="menu-item"><i class="pull-left icon icon-rent"></i><a href="">租约</a></li>
	        <li class="menu-item"><i class="pull-left icon icon-compact"></i><a href="">保理合同</a></li>
	        <li class="menu-item"><i class="pull-left icon icon-asset-package"></i><a href="">资产包</a></li> -->
	
	        <c:forEach var="menu" items="${submenus}">
	            <c:if test="${menu.key == activeMenu}">
	                  <sec:authorize access="hasResource('submenus', '${menu.id}')"> 
	                        <c:forEach var="submenu" items="${menu.submenus}">
	                            <sec:authorize access="hasResource('submenus', '${submenu.id}')"> 
	                                <li class="menu-item ${submenu.id == activeSubmenu ? 'z-active' : ''}">
	                                    <i class="pull-left icon icon-person"></i>
	                                    
	                                    <a class="menu-link" href="${ctx}/${submenu.url}" title="${submenu.description}">${submenu.name}</a>
	                                </li>
	                            </sec:authorize>  
	                        </c:forEach>
	                   </sec:authorize> 
	            </c:if>
	        </c:forEach>
	    </nav>
	</aside>

</c:if>